package com.yule.system.home;

import com.yule.system.dao.SystemUserRoleDao;
import com.yule.system.model.SystemUserRole;
import com.yule.system.model.SystemUserRoleExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SystemUserRoleHome {

    @Autowired
    private SystemUserRoleDao systemUserRoleDao;

    public List<SystemUserRole> findList(SystemUserRoleExample systemUserRoleExample){
        return systemUserRoleDao.selectByExample(systemUserRoleExample);
    }

    public int save(SystemUserRole model){
        int id = systemUserRoleDao.insertSelective(model);
        return id;
    }

    public int delete(SystemUserRoleExample systemUserRoleExample){
        return systemUserRoleDao.deleteByExample(systemUserRoleExample);
    }
}
